package cn.lang.oss.plugin;

import cn.lang.oss.OssKit;
import cn.lang.oss.factory.IOssFactory;
import com.jfinal.plugin.IPlugin;

/**
 * @ClassName : OssPlugin
 * @Description : 作为jfinal插件
 * @Author : Lang
 * @Date: 2020-06-16 18:37
 */
public class OssPlugin implements IPlugin {

    private IOssFactory ossFactory;

    public OssPlugin(){
    }

    public OssPlugin(IOssFactory ossFactory){
        this.ossFactory = ossFactory;
    }

    public boolean start() {
        OssKit.setDefaultOssFactory(this.ossFactory);
        return true;
    }

    public boolean stop() {
        return true;
    }
}
